import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [
	{
		path: '/',
		name: 'login',
		// redirect: {
		//   name: '登录'
		// },
		isShow: true,
		component: resolve => require(['@/Section1'], resolve),
		ico: 'el-icon-edit',
		redirect: '/login',
		children: [{
			path: '/login',
			ico: 'el-icon-edit',
			component: resolve => require(['@/views/login/login'], resolve),
			name: '登录'
		}]
	},
	{
		path: '/index',
		name: '首页',
		ico:'el-icon-s-home',
		redirect: '/index',
		component: resolve => require(['@/Section'], resolve),
		children: [
			{
				path: '/index',
				component: resolve => require(['@/views/index/index/index'], resolve),
				name: '视频图'
			},
			{
				path: '/banner',
				component: resolve => require(['@/views/index/banner/banner'], resolve),
				name: 'banner图'
			},
			{
				path: '/treatment',
				component: resolve => require(['@/views/index/treatment/treatment'], resolve),
				name: '治疗领域'
			},
			{
				path: '/course',
				component: resolve => require(['@/views/index/course/course'], resolve),
				name: '公司历程'
			}
		]
	},
	{
		path: '/about',
		name: '关于君实',
		ico:'el-icon-user-solid',
		component: resolve => require(['@/Section'], resolve),
		children: [
			{
				path: '/about/hand',
				component: resolve => require(['@/views/about/index/index'], resolve),
				name: '头部图'
			},{
				path: '/about',
				component: resolve => require(['@/views/about/about/about'], resolve),
				name: '关于君实'
			},{
				path: '/about/mission',
				component: resolve => require(['@/views/about/mission/mission'], resolve),
				name: '我们的使命'
			},{
				path: '/about/strategy',
				component: resolve => require(['@/views/about/strategy/strategy'], resolve),
				name: '发展战略'
			},{
				path: '/about/course',
				component: resolve => require(['@/views/about/course/course'], resolve),
				name: '发展历程'
			},{
				path: '/about/team',
				component: resolve => require(['@/views/about/team/team'], resolve),
				name: '核心团队'
			},{
				path: '/about/globalization',
				component: resolve => require(['@/views/about/globalization/globalization'], resolve),
				name: '全球化布局'
			}
		]
	},
	{
		path: '/treatment',
		name: '治疗领域',
		ico:'el-icon-s-help',
		component: resolve => require(['@/Section'], resolve),
		children: [
			{
				path: '/treatment/head',
				component: resolve => require(['@/views/treatment/head/head'], resolve),
				name: '头部图'
			},
			{
				path: '/treatment/dev',
				component: resolve => require(['@/views/treatment/dev/dev'], resolve),
				name: '研发平台'
			},
			{
				path: '/treatment/production',
				component: resolve => require(['@/views/treatment/production/production'], resolve),
				name: '生产基地'
			},
			{
				path: '/treatment/pipeline',
				component: resolve => require(['@/views/treatment/pipeline/pipeline'], resolve),
				name: '产品管线'
			},
			{
				path: '/treatment/category',
				component: resolve => require(['@/views/treatment/category/category'], resolve),
				name: '产品分类'
			},
			{
				path: '/treatment/list',
				component: resolve => require(['@/views/treatment/list/list'], resolve),
				name: '产品列表'
			},
			{
				path: '/treatment/resource',
				component: resolve => require(['@/views/treatment/resource/resource'], resolve),
				name: '产品资源库'
			},
			{
				path: '/treatment/launchSetting',
				component: resolve => require(['@/views/treatment/launchSetting/launchSetting'], resolve),
				name: '产品发布设置'
			}
		]
	},
	{
		path: '/news',
		name: '新闻动态',
		ico:'el-icon-s-help',
		component: resolve => require(['@/Section'], resolve),
		children: [
			{
				path: '/news/head',
				component: resolve => require(['@/views/news/head/head'], resolve),
				name: '头部图'
			},
			{
				path: '/news',
				component: resolve => require(['@/views/news/news/news'], resolve),
				name: '新闻资讯'
			}
		]
	},
	{
		path: '/recruitment',
		name: '人才招聘',
		ico:'el-icon-s-help',
		component: resolve => require(['@/Section'], resolve),
		children: [
			{ 
				path: '/recruitment/head',
				component: resolve => require(['@/views/recruitment/head/head'], resolve),
				name: '头部图'
			},
			{ 
				path: '/recruitment/secend',
				component: resolve => require(['@/views/recruitment/secendImg/secendImg'], resolve),
				name: '次屏图'
			},
			{
				path: '/recruitment/introduction',
				component: resolve => require(['@/views/recruitment/introduction/introduction'], resolve),
				name: '公司简介'
			},
			{
				path: '/recruitment/globalization',
				component: resolve => require(['@/views/recruitment/globalization/globalization'], resolve),
				name: '全球化布局'
			},
			{
				path: '/recruitment/position',
				component: resolve => require(['@/views/recruitment/position/position'], resolve),
				name: '招聘职位'
			},
			{
				path: '/recruitment/salary',
				component: resolve => require(['@/views/recruitment/salary/salary'], resolve),
				name: '薪酬福利'
			},
			{
				path: '/recruitment/environment',
				component: resolve => require(['@/views/recruitment/environment/environment'], resolve),
				name: '办公环境'
			},
		]
	},
	{
		path: '/investor',
		name: '投资者关系',
		ico:'el-icon-s-help',
		component: resolve => require(['@/Section'], resolve),
		children: [
			{
				path: '/investor/head',
				component: resolve => require(['@/views/investor/head/head'], resolve),
				name: '头部图'
			},
			{
				path: '/investor',
				component: resolve => require(['@/views/investor/investor/investor'], resolve),
				name: '投资者关系'
			}
		]
	},
	{
		path: '/contact',
		name: '联系我们',
		ico:'el-icon-s-help',
		component: resolve => require(['@/Section'], resolve),
		children: [
			{
				path: '/contact/head',
				component: resolve => require(['@/views/contact/head/head'], resolve),
				name: '头部图'
			},
			{
				path: '/contact',
				component: resolve => require(['@/views/contact/contact/contact'], resolve),
				name: '联系我们'
			}
		]
	},
	
	{
		path: '/report',
		name: '不良事件上报',
		leaf:true,
		ico:'el-icon-question',
		component: resolve => require(['@/Section'], resolve),
		children: [
			{
				path: '/report',
				ico:'el-icon-question',
				component: resolve => require(['@/views/report/report'], resolve),
				name: '不良事件上报'
			}
		]
	},
	{
		path: '/admin',
		name: '管理员',
		ico:'el-icon-s-help',
		component: resolve => require(['@/Section'], resolve),
		children: [
			{
				path: '/admin',
				component: resolve => require(['@/views/admin/list/list'], resolve),
				name: '管理员'
			},
			{
				path: '/role',
				component: resolve => require(['@/views/role/list/list'], resolve),
				name: '权限'
			}
		]
	},
]


/*
	isShow:是否在侧边栏显示
		 true:不显示
		 false|不写，显示
	leaf:是否有下级页面
		true:没有
		false|不写，有
 */

const router = new VueRouter({
  // mode: "hash",
  // base: '/suyuan/',

  mode: "hash",
  base: process.env.BASE_URL,
  routes
})

export default router;